combo: Add .linked class when appropriate
authorMatthias Clasen <mclasen@redhat.com>
Fri, 15 Jan 2016 22:55:44 +0000 (17:55 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Fri, 15 Jan 2016 22:55:44 +0000 (17:55 -0500)
Add the .linked style class to combo boxes which have
an entry, since that is what they are.

gtk/gtkcombobox.c
gtk/gtkcomboboxtext.c

index e3ec42dad7ed27eb80e8ac5bbb5272a59e8c724f..f5661d34c67be4f92be64dcf018e5abf46c891bc 100644 (file)
@@ -4483,6 +4483,9 @@ gtk_combo_box_constructed (GObject *object)
       gtk_widget_show (entry);
       gtk_container_add (GTK_CONTAINER (combo_box), entry);
 
+      context = gtk_widget_get_style_context (GTK_WIDGET (combo_box));
+      gtk_style_context_add_class (context, "linked");
+
       context = gtk_widget_get_style_context (GTK_WIDGET (entry));
       gtk_style_context_add_class (context, "combo");
 
index 43410f3cb7d8746739efc859effa951aeae0763d..12447e79f00c05936e12db8278a5666fe71f8cb8 100644 (file)
@@ -74,7 +74,7 @@
  * # CSS nodes
  *
  * |[<!-- language="plain" -->
- * combobox
+ * combobox.linked
  * ├── entry.combo
  * ├── button.combo
  * ╰── window.popup
@@ -82,7 +82,7 @@
  *
  * GtkComboBoxText has a single CSS node with name combobox. It adds
  * the style class .combo to the main CSS nodes of its entry and button
- * children.
+ * children, and the .linked class to the main node.
  */
 
 static void     gtk_combo_box_text_buildable_interface_init     (GtkBuildableIface *iface);